<template name="card">

	<div class="x7-card-content">
		{{#each couponList}}
		<a href="/card-detail/{{coupon_id}}">
			<div class="x7-card-package">
                <div class="x7-card-info">
                    <div class="x7-card-style">
                        <img src="/img/card/card_style.png" height="30px" width="100px"/>
                        <div class="x7-card-category">
                           {{coutype coupon.coupon_type}}
                        </div> 
                    </div>

                    <div class="x7-card-content">
                        <div class="x7-card-title">
                            <span class="x7-card-name">{{merchant_name}}</span>
                            <span class="x7-card-price">
                                {{couponDetail coupon.rule_detail}}
                            </span>
                            <!-- <div class="x7-card-state" id="selected">
                                <span class="x7-card-font" id="{{id}}">点击领取</span>
                            </div> -->
                        </div>
                        <div class="x7-card-subtitle">
                            <span class="x7-card-subname"></span>
                             <span class="x7-card-subprice">
                                 {{#if coupon.rule_detail.cut}}
                                 满{{coupon.rule_detail.full}}元可用
                                 {{/if}}
                            </span> 
                        </div>
                    <div class="x7-card-border-bottomleft"></div>
                    <div class="x7-card-border-bottomright"></div>
                    </div>
                </div>
                <div class="x7-card-subinfo">
                    <div class="x7-card-border-topleft"></div>
                    <div class="x7-card-border-topright"></div> 
                    <span class="x7-card-left">使用期限：{{getLocalTime coupon.start_time}}&nbsp;~&nbsp;{{getLocalTime coupon.end_time}}</span>
                </div>
			</div>
		</a>
		{{/each}}
	</div>

</template>

<template name="coupon">
	<div class="x7-card-package">
		<div class="x7-card-info">
			<div class="x7-card-style">
				<img src="/img/card/card_style.png" height="30px" width="100px"/>
				<div class="x7-card-category">限时折扣</div>
			</div>

			<div class="x7-card-content">
				<div class="x7-card-title">
					<span class="x7-card-name">如家酒店</span>
					<span class="x7-card-price">￥100</span>
					<div class="x7-card-state">
						<span class="x7-card-font">即将过期</span>
					</div>
				</div>
				<div class="x7-card-subtitle">
					<span class="x7-card-subname">商家兑换券</span>
					<span class="x7-card-subprice">满100元可用</span>
				</div>
			<div class="x7-card-border-bottomleft"></div>
			<div class="x7-card-border-bottomright"></div>
			</div>
		</div>
		<div class="x7-card-subinfo">
			<div class="x7-card-border-topleft"></div>
			<div class="x7-card-border-topright"></div> 
			<span class="x7-card-left">使用期限：2020年8月12日</span>
		</div>
	</div>
</template>

